from django.contrib import admin
from .models import *
@admin.register(ClassLevel1)
class ClassLevel1TeleAdmin(admin.ModelAdmin):
    list_display = ('id','name','msg')
@admin.register(ClassLevel2)
class ClassLevel2TeleAdmin(admin.ModelAdmin):
    list_display = ('id','name','msg')
@admin.register(ClassLevel3)
class ClassLevel3TeleAdmin(admin.ModelAdmin):
    list_display = ('id','name','msg')
@admin.register(GoodsLocation1)
class GoodsLocation1TeleAdmin(admin.ModelAdmin):
    list_display = ('id','name','msg')
@admin.register(GoodsLocation2)
class GoodsLocation2TeleAdmin(admin.ModelAdmin):
    list_display = ('id','name','msg')
@admin.register(GoodsLocation3)
class GoodsLocation3TeleAdmin(admin.ModelAdmin):
    list_display = ('id','name','msg')
# @admin.register(GoodesService)
# class GoodesServiceTeleAdmin(admin.ModelAdmin):
#     list_display = ('id','title','msg')


# class ColorClass(admin.StackedInline):
#     model = GoodsColor
class GoodsInfo(admin.StackedInline):
    model = GoodesDetailed
    # inlines = [ColorClass,]
@admin.register(GoodsBase)
class GoodsBaseTeleAdmin(admin.ModelAdmin):
    list_display = ('id','title','src','star_time','last_time','isDelete')
    inlines = [GoodsInfo]

@admin.register(GoodesDetailed)
class GoodesDetailedTeleAdmin(admin.ModelAdmin):
    list_display = ('id','title','price','imgList','richText','shelves','GoodsBase','star_time','last_time','isDelete')

# @admin.register(ColorClass)
# class ColorClassTeleAdmin(admin.ModelAdmin):
#     list_display = ('id','title')



@admin.register(GoodsGather)
class GoodsGatherTeleAdmin(admin.ModelAdmin):
    list_display = ('id','GoodsBase')



@admin.register(Goodspackage)
class GoodspackageTeleAdmin(admin.ModelAdmin):
    list_display = ('id',)

@admin.register(GoodsColor)
class GoodsColorTeleAdmin(admin.ModelAdmin):
    list_display = ('id',)

@admin.register(specifications)
class specificationsTeleAdmin(admin.ModelAdmin):
    list_display = ('id',)

@admin.register(GoodesService)
class GoodesServiceTeleAdmin(admin.ModelAdmin):
    list_display = ('id',)




# @admin.register(models.Card)
# class ControlCard(admin.ModelAdmin):
#     list_display = ["card_id", "card_user", "add_time"]
    
#     # 在Card页面显示更多信息CardDetail
#     inlines = [MoreInfo]